home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Czytniki RSS / RSS Bandit 1.3.0.42 / RssBandit Installer.msi / _172FF5180BC61D3C6D240F14338A23AA / _E1CF0BD84AAF4C3BA57A8C5EF69B76B6 < prev    next >
Text File  |  2004-12-24  |  10KB  |  230 lines

  1.         <xsl:stylesheet version='1.0' 
  2.                 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  3.                 xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
  4.                 xmlns:xhtml='http://www.w3.org/1999/xhtml'
  5.                 xmlns:slash='http://purl.org/rss/1.0/modules/slash/' 
  6.                 xmlns:dc='http://purl.org/dc/elements/1.1/' 
  7.                 exclude-result-prefixes='content slash dc'>
  8.  
  9.           <xsl:output method='xml' indent='yes' /> 
  10.  
  11.         <!-- channel group newspaper -->
  12.         <xsl:template match="newspaper[@type='group']">
  13.             <html><head><title><xsl:value-of select='title'/></title></head>
  14.             <!-- <base href="{//channel/link}" /></head> -->
  15.             <body>
  16.               <xsl:for-each select="//channel">
  17.             <xsl:choose>
  18.                   <xsl:when test="current()/image">
  19.                 <div class="PostTitle" style="FLOAT: right">
  20.                     <a href="{current()/image/link}" title="{current()/image/title}"><img src="{current()/image/url}"  alt="{current()/image/title}" border="0">
  21.                         <xsl:if test="current()/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="current()/image/width"/></xsl:attribute></xsl:if>
  22.                         <xsl:if test="current()/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="current()/image/height"/></xsl:attribute></xsl:if>
  23.                     </img></a>
  24.                 </div>
  25.             </xsl:when>
  26.             <xsl:otherwise>
  27.                   <div class="PostTitle" style="FLOAT: right">
  28.                       <a href="{current()/link}"><xsl:value-of select="current()/title" /></a>
  29.                 </div>
  30.             </xsl:otherwise>
  31.             </xsl:choose>
  32.             <xsl:for-each select='current()//item'>
  33.               <table cellpadding="1" cellspacing="0" border="0" bgcolor="#006699">
  34.             <tr>
  35.               <td class="PostFrame" height="100%" width="100%" valign="top">         
  36.                 <table width="100%" border="0" cellpadding="2" cellspacing="0"><tr>       
  37.                 <td valign="top" bgcolor="#eeeeee">    
  38.                   <font
  39.                    face="verdana, arial, helvetica, sans-serif" size="2">
  40.                 <b><xsl:value-of  disable-output-escaping='yes' select='current()/title'/></b></font><br />
  41.                 <xsl:choose>
  42.                   
  43.                   <xsl:when test='current()/author'>
  44.                     <font    face="verdana, arial, helvetica, sans-serif" size="2">
  45.                       by <xsl:value-of select='current()/author'/>
  46.                     </font>
  47.                   </xsl:when>
  48.                   <xsl:when test='current()/dc:creator'>
  49.                     <font    face="verdana, arial, helvetica, sans-serif" size="2">
  50.                       by <xsl:value-of select='current()/dc:creator'/>
  51.                     </font>
  52.                   </xsl:when>                
  53.                 </xsl:choose>
  54.                 <xsl:text> </xsl:text> on <xsl:value-of select='current()/pubDate'/><br />
  55.                   </td>
  56.                   </tr></table>
  57.                   </td></tr></table>                  
  58.                   <br />
  59.  
  60.                   <xsl:choose>
  61.                 <xsl:when test='current()/xhtml:body'>
  62.                   <xsl:copy-of select='current()/xhtml:body'/>
  63.                 </xsl:when>
  64.                 <xsl:when test='current()/content:encoded'>
  65.                   <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/>
  66.                 </xsl:when>
  67.                 <xsl:otherwise>
  68.                   <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
  69.                 </xsl:otherwise>
  70.                   </xsl:choose>
  71.                   <p>
  72.                 [
  73.                 <a href='{current()/link}'>Read on...</a> 
  74.                  <xsl:choose>
  75.   <xsl:when test='current()/comments'> |<xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  76.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  77.   <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  78.   </xsl:when> 
  79.    <xsl:when test='current()/slash:comments'> |
  80.     <xsl:value-of select='current()/slash:comments'/> Comments...    
  81.   </xsl:when> 
  82.   </xsl:choose>        
  83.                   ]
  84.                 </p>
  85.                  </xsl:for-each>
  86.                  <hr />
  87.               </xsl:for-each>
  88.                 </body></html>
  89.               </xsl:template>
  90.  
  91.  
  92.      <!-- channel newspaper -->
  93.         <xsl:template match="newspaper[@type='channel']">
  94.             <html><head><title><xsl:value-of select='//channel/title'/></title>
  95.             <base href="{//channel/link}" /></head>
  96.             <body>
  97.     <xsl:choose>
  98.                   <xsl:when test="//channel/image">
  99.                 <div class="PostTitle" style="FLOAT: right">
  100.                     <a href="{//channel/image/link}" title="{//channel/image/title}"><img src="{//channel/image/url}"  alt="{//channel/image/title}" border="0">
  101.                         <xsl:if test="//channel/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="//channel/image/width"/></xsl:attribute></xsl:if>
  102.                         <xsl:if test="//channel/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="//channel/image/height"/></xsl:attribute></xsl:if>
  103.                     </img></a>
  104.                 </div>
  105.             </xsl:when>
  106.             <xsl:otherwise>
  107.                   <div class="PostTitle" style="FLOAT: right">
  108.                       <a href="{//channel/link}"><xsl:value-of select="//channel/title" /></a>
  109.                 </div>
  110.             </xsl:otherwise>
  111.             </xsl:choose>
  112.             <xsl:for-each select='//item'>
  113.               <table cellpadding="1" cellspacing="0" border="0" bgcolor="#006699">
  114.             <tr>
  115.               <td class="PostFrame" height="100%" width="100%" valign="top">         
  116.                 <table width="100%" border="0" cellpadding="2" cellspacing="0"><tr>       
  117.                 <td valign="top" bgcolor="#eeeeee">    
  118.                   <font
  119.                    face="verdana, arial, helvetica, sans-serif" size="2">
  120.                 <b><xsl:value-of  disable-output-escaping='yes' select='current()/title'/></b></font><br />
  121.                 <xsl:choose>
  122.                   
  123.                   <xsl:when test='current()/author'>
  124.                     <font    face="verdana, arial, helvetica, sans-serif" size="2">
  125.                       by <xsl:value-of select='current()/author'/>
  126.                     </font>
  127.                   </xsl:when>
  128.                   <xsl:when test='current()/dc:creator'>
  129.                     <font    face="verdana, arial, helvetica, sans-serif" size="2">
  130.                       by <xsl:value-of select='current()/dc:creator'/>
  131.                     </font>
  132.                   </xsl:when>                
  133.                 </xsl:choose>
  134.                 <xsl:text> </xsl:text> on <xsl:value-of select='current()/pubDate'/><br />
  135.                   </td>
  136.                   </tr></table>
  137.                   </td></tr></table>                  
  138.                   <br />
  139.  
  140.                   <xsl:choose>
  141.                 <xsl:when test='current()/xhtml:body'>
  142.                   <xsl:copy-of select='current()/xhtml:body'/>
  143.                 </xsl:when>
  144.                 <xsl:when test='current()/content:encoded'>
  145.                   <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/>
  146.                 </xsl:when>
  147.                 <xsl:otherwise>
  148.                   <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
  149.                 </xsl:otherwise>
  150.                   </xsl:choose>
  151.                   <p>
  152.                 [
  153.                 <a href='{current()/link}'>Read on...</a> 
  154.                 <xsl:choose>
  155.   <xsl:when test='current()/comments'> |<xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  156.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  157.   <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  158.   </xsl:when> 
  159.    <xsl:when test='current()/slash:comments'> |
  160.     <xsl:value-of select='current()/slash:comments'/> Comments...    
  161.   </xsl:when> 
  162.   </xsl:choose>        
  163.                   ]
  164.                 </p>
  165.                  </xsl:for-each>
  166.                 </body></html>
  167.               </xsl:template>
  168.  
  169.  
  170.           <!-- single news item -->
  171.           <xsl:template match="newspaper[@type='newsitem']">
  172.             <html><head><title><xsl:value-of select='//item/title'/></title>
  173.             <base href="{//item/link}" /></head>
  174.             <body>
  175.               <table cellpadding="1" cellspacing="0" border="0" bgcolor="#006699">
  176.             <tr>
  177.               <td width="100%">
  178.                 <table width="100%" border="0" cellpadding="2" cellspacing="0"><tr>
  179.                 <td valign="top" bgcolor="#eeeeee">    
  180.                   <font
  181.                    face="verdana, arial, helvetica, sans-serif" size="2">
  182.                 <b><xsl:value-of  disable-output-escaping='yes' select='//item/title'/></b></font><br />
  183.                 <xsl:choose>
  184.                   
  185.                   <xsl:when test='//item/author'>
  186.                     <font    face="verdana, arial, helvetica, sans-serif" size="2">
  187.                       by <xsl:value-of select='//item/author'/>
  188.                     </font>
  189.                   </xsl:when>
  190.                   <xsl:when test='//item/dc:creator'>
  191.                     <font    face="verdana, arial, helvetica, sans-serif" size="2">
  192.                       by <xsl:value-of select='//item/dc:creator'/>
  193.                     </font>
  194.                   </xsl:when>                
  195.                 </xsl:choose>
  196.                 <xsl:text> </xsl:text> on <xsl:value-of select='//item/pubDate'/><br />
  197.                   </td>
  198.                   </tr></table>
  199.                   </td></tr></table>
  200.                   <br />
  201.  
  202.                   <xsl:choose>
  203.                 <xsl:when test='//item/xhtml:body'>
  204.                   <xsl:copy-of select='//item/xhtml:body'/>
  205.                 </xsl:when>
  206.                 <xsl:when test='//item/content:encoded'>
  207.                   <xsl:value-of  disable-output-escaping='yes' select='//item/content:encoded'/>
  208.                 </xsl:when>
  209.                 <xsl:otherwise>
  210.                   <xsl:value-of disable-output-escaping='yes' select='//item/description'/>
  211.                 </xsl:otherwise>
  212.                   </xsl:choose>
  213.                   <p>
  214.                 [
  215.                 <a href='{//item/link}'>Read on...</a> 
  216.                 <xsl:choose>
  217.   <xsl:when test='//item/comments'> | <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  218.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  219.   <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  220.   </xsl:when> 
  221.    <xsl:when test='//item/slash:comments'> | 
  222.     <xsl:value-of select='//item/slash:comments'/> Comments...    
  223.   </xsl:when> 
  224.   </xsl:choose>
  225.   ]
  226.                 </p>
  227.                 
  228.                 </body></html>
  229.               </xsl:template>
  230.             </xsl:stylesheet>